<?$this->_extends("_layouts/main_layout");?>
<?$this->_block("contents");?>
<script type="text/javascript">
function changeDiscipline_ni(discipline_id){
	//alert($("#term_id").val());
	//alert(discipline_id);
	$.ajax({
		type : "post",
		method : "post",
		dataType : "json",
		data:{"discipline_id":discipline_id,"term_id":$("#term_id").val()},
		url : "<?php echo url('task/disciplineChange')?>",
		success : function(data) {
			//alert(data);		
			var classes_info = '<option value="0">-请选择-</option>';
			for (var i in data.class_list) {
				classes_info += '<option value="'+i+'">'+data.class_list[i]+'</option>';
			}
			$('#classid').empty();
			$('#classid').append(classes_info);
		}				
	});
}
<!--
function check(){
		return confirm('确定删除吗？');
	
}
//-->
</script>

<?php if (hp('links.2')) {?>
<input type="button" class="btn1" value="添加"  onclick="window.location.href='<?php echo url('links/create');?>';" style="width:80px;margin-top:7px;margin-bottom:7px;" />
<?php }?>
<table class="list_table" width="100%" cellpadding="0" cellspacing="0">
  <tr>
    <th width="">序号</th>
    <th width="">名称</th>
    <th width="">链接地址</th>
    <th width="">排序</th>
    <?php if (hp('links.3')||hp('links.4')) {?>
    <th width="">操作</th>
    <?php }?>
  </tr>
  <?php
	//print_r($list);
 foreach ($list as $i=>$row) {
	 ?>
  <tr>
    <td><?php echo $i+$start+1?></td>
    <td><?php echo $row['name']?></td>
    <td><?php echo $row['url'];?></td>
    <td><?php echo $row['taxis'];?></td>
    <?php if (hp('links.3')||hp('links.4')) {?>
    <td>
    	<?php if (hp('links.3')) {?>
        <a href="<?=url('links/edit', array('id'=>$row['id']))?>" style="color:blue;" title="修改">[修改]</a>&nbsp; 
        <?php }?>
        <?php if (hp('links.4')) {?>
        <a href="<?=url('links/delete', array('id'=>$row['id']))?>" onclick="return check()" style="color:blue;" title="删除">[删除]</a>
        <?php }?>
    </td>
    <?php }?>
  </tr>
  <? }?>
</table>
<br>
<? $this->_control("pagination", "", array('pagination'=>$pager));?>
<? $this->_endblock();?>
